#include <stdio.h>
#include <float.h>
#include <math.h>

int main(void)
{
	// 正无穷大
	float positive_infinity = INFINITY;
	printf("Positive infinity: %f\n", positive_infinity);

	// 负无穷大
	float negative_infinity = -INFINITY;
	printf("Negative infinity: %f\n", negative_infinity);

	// 除以0以产生无穷大数
	printf("1.0f / 0.0 = %f\n", 1.0 / 0.0);

	// nano 0/0
	printf("0.0 / 0.0 = %f\n", 0.0 / 0.0);
	// nan not a number
	
//	float negative_sqrt = sqrt(-1.0f);
//	printf("sqrt(-0.1f) = %f\n", negative_sqrt);

	return 0;
}
